package org.feifei.pet.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.feifei.pet.domain.PetType;
import org.feifei.pet.service.PetTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author forever
 * @Description: 宠物类型的Controller层
 * @date 2021/12/13 14:13
 */
@RestController
@RequestMapping("/petType")
@Api(tags = "宠物类型接口")
public class PetTypeController {

    @Resource
    private PetTypeService petTypeService;

    /**
     * 查询所有的数据
     * @return
     */
    @GetMapping
    @ApiOperation("无条件查询所有的宠物类型")
    public List<PetType> getAllPetType() {
        return petTypeService.list();
    }

}
